//
//  OMProduct.h
//  OMENGO
//
//  Created by 梁尚嘉 on 2016/12/23.
//  Copyright © 2016年 Kamfat. All rights reserved.
//

#import "BaseModel.h"

@protocol OMProductProtocol <NSObject>

@property (nonatomic, copy) NSString *price;
@property (nonatomic, copy) NSString *id;
@property (nonatomic, assign)NSUInteger quantity;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *image;
@property (nonatomic, copy) NSString *brand;
@property (nonatomic, copy) NSString *unit;
@end

@interface OMSpecificationItem : BaseModel
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *parameterid;
@property (nonatomic, copy) NSString *value;

@end

@interface OMPromotion: BaseModel
@property (nonatomic, assign) float minimum_price;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *title;
@end

@interface OMProduct : BaseModel <OMProductProtocol>
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *id;
@property (nonatomic, copy) NSString *product_category_id;
@property (nonatomic, strong) NSArray <OMSpecificationItem*>*specification_items;
@property (nonatomic, copy) NSString *price;
@property (nonatomic, copy) NSString *image;
@property (nonatomic, copy) NSString *unit;
@property (nonatomic, copy) NSString *weight;
@property (nonatomic, copy) NSString *brand;
@property (nonatomic, assign) NSInteger availableStock;

@property (nonatomic, strong) NSArray <OMPromotion*>*promotions;
/** 描述*/
@property (nonatomic, copy) NSString *caption;
/** 销量*/
@property (nonatomic, assign) NSUInteger sales;
@property (nonatomic, assign) NSUInteger quantity;
@end
